//
//  HeartTableViewCell.m
//  happyHealthyWalk
//
//  Created by newhuidong on 16/2/22.
//  Copyright © 2016年 HuiDong. All rights reserved.
//

#import "HeartTableViewCell.h"
#import "Data.h"

@interface HeartTableViewCell ()


@end

@implementation HeartTableViewCell

- (void)awakeFromNib {
    // Initialization code
}
-(void)setDic:(NSDictionary *)dic{
    
    _dic=dic;
    Data* data=[[Data alloc]initWithDic:dic];
    self.headImage.image=[UIImage imageNamed:[NSString stringWithFormat:@"%@",data.imageName]];
    self.title_label.text=data.title;
    self.detail_label.text=data.detail;
    
    
    
}

+(instancetype)heartcellWithTableView:(UITableView *)tableView{
    static NSString * identifer=@"cell";
    

    HeartTableViewCell * cell=[tableView dequeueReusableCellWithIdentifier:identifer];
    if (cell==nil) {
        
        cell=[[[NSBundle mainBundle]loadNibNamed:@"HeartTableViewCell" owner:nil options:nil] firstObject];
    }
    cell.title_label.adjustsFontSizeToFitWidth=YES;
    cell.detail_label.adjustsFontSizeToFitWidth=YES;
    cell.detail_label.numberOfLines=0;
    cell.detail_label.font=[UIFont fontWithName:@"Arial" size:15];
    cell.detail_label.textColor=[UIColor grayColor];
    cell.detail_label.lineBreakMode=2;
    cell.selectionStyle=UITableViewCellSelectionStyleNone;
    
    
    return cell;
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

}

@end
